package com.mjh.manager;

import org.apache.log4j.Logger;
import com.mjh.bean.SystemConfig;
import com.mjh.config.GlobalConfig;
import com.mjh.dao.SystemConfigDAO;

public class SystemConfigManager {

	public static Logger log = Logger.getLogger(SystemConfigManager.class);
	
	private SystemConfigDAO dao = new SystemConfigDAO();
	
	public void setConfig(SystemConfig s){
		dao.setSystemConfig(s);
		GlobalConfig.setSysConfig(s);
	}
	
	public void setConfig(String name, String value){
		dao.setValue(name, value);
		GlobalConfig.setSysConfig(dao.getSystemConfig());
	}
	
	public SystemConfig getSysConfig(){
		return dao.getSystemConfig();
	}
}
